<?php
/* Template Name: 无边栏页面
 * Author: 缙哥哥
 * Modified: 缙哥哥
 */
?>
<?php

if(!defined('DB_NAME')) die();

get_header();

if( ismobile() && !get('ini_mark') ) :
	include "mp/page.php";
else:
	while (have_posts()): the_post();

//导航菜单
	$custom_fields = get_post_custom_keys($post_id);
	if( !in_array( 'pgmenu', $custom_fields) ){
		$pgmenu = 0;
	}
?>
	<div class="hide"><?php ini_map()?></div>
	<div class="main-page" <?php if( $pgmenu!==1 ) echo 'style="padding:20px 25px"'?>>
		<?php if( $pgmenu==1 && !ismobile() ) wp_nav_menu( array('theme_location' => 'pagemenu', 'class' => 'pg-menu') )?>
		<h2 class="entry-title"><?php the_title()?></h2>
		<span><?php edit_post_link('编辑文章','<i class="icon-edit"></i> ')?></span>
<?php if( get('ini_ad3') ) echo "<div class=\"ad3\">".get('ini_ad3_code')."</div>\n"?>
		<div class="context" property="v:description">
<?php
if ( !(ini_count($text))==0 ){    # 判断是否有文字
	echo '			<div class="excerpt hide">';
		ini_excerpt(150);
	echo "</div>\n";
}
the_content();
?>
		</div>
<?php if( get('ini_ad4') ) echo "<div class='ad4'>".get('ini_ad4_code')."</div>"?>

<?php ini_bdshare()?> 
<?php endwhile?>
<?php endif;#ismobile?>
		</div>
<?php get_footer()?>